fix(app): keep session composer clearance synced#375
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR switches scroll-dock resize handling to native ResizeObserver instances, updates the session message timeline bottom padding to account for the composer dock CSS variable, and adds test helpers and tests to validate that --composer-dock-height is set and updated on prompt dock resizes. ChangesSession scroll-dock & layout
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Review rate limit: 7/10 reviews remaining, refill in 13 minutes and 5 seconds. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/app/src/pages/session/use-session-scroll-dock.test.ts`:
- Around line 259-263: The cleanup restores the CSS var before calling
dispose(), but createSessionScrollDock's dispose() removes the variable and can
override restoration; change the order so you call dispose() first and then
restore or remove the "--composer-dock-height" using previousDockHeight and
document.documentElement.style.setProperty/removeProperty (i.e., call dispose()
before applying previousDockHeight or removing the property).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 88d0d28e-e32d-4622-8452-67fafc13b264
📒 Files selected for processing (4)
packages/app/src/pages/session/message-timeline.tsxpackages/app/src/pages/session/use-session-scroll-dock.test.tspackages/app/src/pages/session/use-session-scroll-dock.tspackages/app/src/shell-frame-contract.test.ts
There was a problem hiding this comment.
Code Review
This pull request replaces the @solid-primitives/resize-observer dependency with manual ResizeObserver management in use-session-scroll-dock.ts to better handle element reference updates. It also increases the bottom padding of the message timeline to 32px and introduces new test utilities and a test case to verify dynamic height updates of the composer dock. I have no feedback to provide.
Summary
Why
The latest conversation turn could sit too close to the composer after #360. When image attachments or todo/follow-up docks increased composer height after initial mount, the timeline did not always update
--composer-dock-height, so the conversation flow was not pushed upward correctly.Related Issue
No linked issue. This follows up on the spacing regression noticed after #360.
Human Review Status
Pending. A human should make the final merge decision after reviewing the final diff and verification evidence.
Review Focus
packages/app/src/pages/session/use-session-scroll-dock.ts: observer lifecycle for prompt/content refs and cleanup.packages/app/src/pages/session/message-timeline.tsx: whether the extra 32px composer clearance feels right visually.use-session-scroll-dock.test.ts.Risk Notes
Low UI layout risk. This changes session timeline spacing and ResizeObserver handling in the composer dock. No data, permissions, dependency, migration, packaging, signing, or updater changes.
How To Verify
Screenshots or Recordings
No screenshot attached. Manual Electron dev check was performed locally; screen capture was unavailable because macOS Screen Recording permission was not granted for the agent terminal.
Checklist
dev, and my PR title and commit messages use Conventional Commits in EnglishSummary by CodeRabbit